package builder;

import java.util.Vector;

import model.Action;

public class ProxyBuilder extends AbstractPatternBuilder {

	private String client = "Client";
	private String subject = "Subject";
	private String realSubject = "RealSubject";
	private String proxy = "Proxy";
	
	public ProxyBuilder() {
		super();
	}

	@Override
	public Vector<Action> buildPattern() {
		
		this.buildClass(client);	
		this.buildClass(realSubject);	
		this.buildClass(proxy);
				
		this.buildAbstractClass(subject);
		
		this.buildGeneralization(realSubject, subject);
		this.buildGeneralization(proxy, subject);
		
		this.buildAssociation(client, subject);
		this.buildAssociation(proxy, realSubject);

		return patternActions;
	}

	@Override
	public void changeNames() {

		client = names.get(0);
		subject = names.get(1);
		realSubject = names.get(2);
		proxy = names.get(3);	
		
	}
	
	@Override
	public int cantUMLElements() {
		return 4;
	}

}
